import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'normalize.css/normalize.css'// A modern alternative to CSS resets
import locale from 'element-ui/lib/locale/lang/zh-CN'
import App from './App'
import router from './router'
import store from './store'
import '@/icons' // icon
import '@/permission' // 权限
import {default as api} from './utils/api'
import directives from "@/directives";
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'

import 'vue-testcase-minder-editor/lib/VueTestcaseMinderEditor.css'
import '@/styles/index1.css'

import VueTestcaseMinderEditor from 'vue-testcase-minder-editor'

Vue.use(VueTestcaseMinderEditor)

Vue.use(Viewer)
import {hasPermission} from "./utils/hasPermission";
// 引入echarts
import * as echarts from 'echarts'

Vue.prototype.$echarts = echarts

Vue.use(ElementUI, {locale, size: 'small', zIndex: 1000})
Viewer.setDefaults({
  Options: {
    "z-index": 99999,
    "inline": true,
    "button": true,
    "navbar": true,
    "title": true,
    "toolbar": true,
    "tooltip": true,
    "movable": true,
    "zoomable": true,
    "rotatable": true,
    "scalable": true,
    "transition": true,
    "fullscreen": true,
    "keyboard": true,
    "url": "data-source"
  }
});
Vue.prototype.api = api
//全局的常量
Vue.prototype.hasPerm = hasPermission
Vue.use(directives);

//生产环境时自动设置为 false 以阻止 vue 在启动时生成生产提示。
Vue.config.productionTip = (process.env.NODE_ENV != 'production')
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: {App}
})
